package com.dljd.javase.t12;

public class Test {
    public static void main(String[] args) {

        System.out.println(Thread.MAX_PRIORITY);
        Thread t=new Thread(){
            @Override
            public void run() {
                for (int i = 1; i <10 ; i++) {

                    this.setPriority(i);
                    System.out.println(this.isAlive());
                    try {
                        Thread.sleep(200);
                    } catch (InterruptedException e) {
                        e.printStackTrace();
                    }
                }
            }
        };
        t.start();

        try {
            t.join();
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
        System.out.println(t.isAlive());

//        MyThread  t1=new MyThread();
//        MyThread  t2=new MyThread();
//        t1.start();
//        t2.start();
//
//        for (int i = 0; i <10 ; i++) {
//            System.out.println(Thread.currentThread().getName()+i);
//        }

       /*Thread  t1=new Thread(new Mythread1());
       t1.start();

        Thread  t2=new Thread(new Mythread1());
        t2.start();*/

      /* new Thread(){
           public void run() {
               for (int i = 0; i <100000 ; i++) {
                   System.out.println("$");
               }
           }
       }.start();

        new Thread(){
            public void run() {
                for (int i = 0; i <100000 ; i++) {
                    System.out.println("A");
                }
            }
        }.start();

        new Thread(new Runnable() {
            public void run() {
                for (int i = 0; i <100000 ; i++) {
                    System.out.println("C");
                }
            }
        }).start();*/

    }
}
